[index]

On Control Statement

Syntax

on <messageName> [<parameter>
[, <parameter> [, <parameter> [...]]]]

Description

The on keyword marks the beginning of a message handler and associates the handler with a particular message. <MessageName> is the message which the handler will intercept. When an object receives a message, Oracle Media Objects looks at the object's script to see if it contains a handler for the message. If Oracle Media Objects finds a handler, it executes the script statements following the on <messageName> statement. The handler is executed until Oracle Media Objects encounters an exit, end, pass, or return statement.

Notes

Handlers cannot be nested within other handlers or functions. For example, an on statement cannot appear between another on statement or a function statement and its end statement. The value you provide for <messageName> must be one word, must begin with a letter, and cannot include any punctuation marks (except underscores). The same holds true for the value provided for <parameter>.
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.